package com.bestv.search.common.service.impl;

import com.bestv.search.common.dao.HistoryDao;
import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.History;
import com.bestv.search.common.service.HistoryManager;

import java.util.List;

/**
 * @author Michael Wang
 */

// $Id$
public class HistoryManagerImpl implements HistoryManager {

    private HistoryDao historyDao;

    public HistoryDao getHistoryDao() {
        return historyDao;
    }

    public void setHistoryDao(HistoryDao historyDao) {
        this.historyDao = historyDao;
    }

    public History getHistoryByUserId(DataSourceKey key, String userId) {
        return historyDao.getHistoryByUserId(userId);
    }

    public void saveHistoryList(DataSourceKey key, List<History> historyList) {
        historyDao.saveHistoryList(historyList);
    }
}
